<template>
    <el-pagination
        v-model:current-page="pagination.current"
        v-model:page-size="pagination.pageSize"
        :page-sizes="[5, 10, 15, 20, 25]"
        :small="small"
        :disabled="false"
        :background="false"
        layout="total, sizes, prev, pager, next, jumper"
        :total="pagination.total"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
    />
</template>
<script setup>
import { defineEmits } from 'vue';
import { defineProps } from 'vue';
const props = defineProps(['pagination']);
const emit = defineEmits(['show']);
// function handleSizeChange(val) {
//     console.log(`每页 ${val} 条`);
//     emit("show", { pageSize: val });
// }
function handleCurrentChange(val) {
    emit("show", { current: val, pageSize: props.pagination.pageSize });
}
</script>
